<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
 
// import Joomla view library
jimport('joomla.application.component.view');
 
/**
 * HelloWorlds View
 */
class ForumViewPost extends JView
{
	protected $state;
	protected $item;
	protected $form;
	protected $topic;
	

	/**
	 * Display the view
	 */
	public function display($tpl = null)
	{
		
		$app		= JFactory::getApplication();
		$this->params		= $app->getParams();
		$this->item		= $this->get('Item');
		$this->form		= $this->get('Form');
		
		$tid = JRequest::getVar('tid');
		$catid = JRequest::getVar('catid');
		
		$model = $this->getModel();
		$model->setState('topic.id', $tid);
		$this->topic	= $this->get('Topic');

		// Check for errors.
		if (count($errors = $this->get('Errors'))) {
			JError::raiseError(500, implode("\n", $errors));
			return false;
		}
		$this->assignRef('tid',		$tid);
		$this->assignRef('catid',		$catid);
		//Escape strings for HTML output
		$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));

		parent::display($tpl);
	}

	
}
